package com.yuandengta.yomall.search.feign;

import com.yuandengta.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 商品服务远程接口 {@link ProductFeignService}
 *
 * @author Kevin
 * @email: 178676392@qq.com
 */
@FeignClient("yomall-product")
public interface ProductFeignService {

    /**
     * 获取属性信息
     * @param attrId 属性id
     * @return
     */
    @GetMapping("/product/attr/info/{attrId}")
    R getAttrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 品牌查询
     * @param brandIds
     * @return
     */
    @GetMapping("/product/brand/infos")
    R getBrandInfos(@RequestParam("brandIds") List<Long> brandIds);
}
